<?php
session_start();
include("header.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Adminstrative AreaOnline Quiz </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../quiz.css" rel="stylesheet" type="text/css">
</head>

<body>
<?php
//include("header.php");
extract($_POST);
if(isset($submit))
{
	include("../database.php");
	$rs=mysql_query("select * from mst_faculty where login='$loginid' and pass='$pass' ",$cn) or die(mysql_error());
	$rs1=mysql_query("SELECT * FROM `mst_faculty` where auth='0' and login='$loginid'") or die("Could not Connect My Sql");
	if(mysql_num_rows($rs)<1)
	{
		{
		echo "<BR><BR><BR><BR><div class=head1> Invalid User Name or Password <div>";
		exit;
		}
	}
	elseif(mysql_num_rows($rs1)==1)
	{
		
		echo "<BR><BR><BR><BR><div class=head1> Administration Pending  <div>";
		echo "<BR><BR><BR><BR><div class=head1> <br> Go Back To Login Page <a href=index.php>Login</a><div>";
		exit;
	}
	else
	{
		$_SESSION[alogin]="true";
	}
}
else if(!isset($_SESSION[alogin]))
{
	echo "<BR><BR><BR><BR><div class=head1> Your are not logged in<br> Please <a href=index.php>Login</a><div>";
		exit;
}
?>

<p class="head1">Welcome to Faculty Area </p><br>
<br>
<i>
<p align="left" style="margin-left:300px" class="style7"><a href="subadd.php">Add new Subject</a></p>
<p align="right" style="margin-right:300px" class="style7"><a href="view_all_subject.php">View Subjects</a></p>
<br>
<p align="left" style="margin-left:300px" class="style7"><a href="testadd.php">Add Test to existing subject</a></p>
<p align="right" style="margin-right:300px" class="style7"><a href="view_all_test.php">View Tests</a></p>

<br>
<p align="left" style="margin-left:300px" class="style7"><a href="questionadd.php">Add Question to existing test</a></p>
<p align="right" style="margin-right:300px" class="style7"><a href="view_question.php">View Questions</a></p><br>

<br>

</i><p align="center" class="head1">&nbsp;</p>
</body>
</html>
